<script setup>
import { useChannelsStore } from '@/stores/channels.js'
import { storeToRefs } from 'pinia'
const channelsStore = useChannelsStore()
const { channels, channelsName } = storeToRefs(channelsStore)
</script>

<template>
    <div v-for="channel in channels" :key="channel.id">
      {{ channel.id }} ==> {{ channel.name }}
    </div>
  <button @click="channelsStore.fetchChannels">获取Channels</button>
  {{ channelsName }}
</template>

<style scoped>
</style>
